package com.kelvem.saas.workbanch.core.manager.dao;

import com.kelvem.saas.workbanch.fsm.anno.entity.RegisterDao;
import com.kelvem.saas.workbanch.fsm.dao.BaseDao;
import com.kelvem.saas.workbanch.core.manager.model.MetaTableActionEntity;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 实体表行为Dao
 *
 * @author kelvem
 * @version 1.0
 */
@Mapper
@RegisterDao(entityClass= MetaTableActionEntity.class)
@Repository
public interface MetaTableActionDao extends BaseDao<MetaTableActionEntity> {

    @Select("select * from meta_table_action where meta_table_id=#{metaTableId}")
    List<MetaTableActionEntity> queryMetaTableActionList(Long metaTableId);

    @Delete("delete from meta_table_action where meta_table_id=#{metaTableId}")
    Integer deleteByParentMetaTableId(Long metaTableId);
}
